#ifndef CPP_INFO_H
#define CPP_INFO_H

#include <DefineLibReflection.h>
#include <memory>
#include <DefineCommon.h>

namespace CppInfo
{
//
struct Variable;
typedef SmartPtr(Variable) VariablePtr;
struct REFLECTION_DLL Variable
{
    EString name;
    EString typeName;//
    EString userData;
    EString getPrintStr();
};

struct Function;
typedef SmartPtr(Function) FunctionPtr;
struct REFLECTION_DLL Function
{
    EString userData;
    EString name;
    EString returnType;
    EList<VariablePtr> parameterList;

    bool ifPureVirtual = false;
    EString getPrintStr();
};


struct Enum;
typedef SmartPtr(Enum) EnumPtr;
struct REFLECTION_DLL Enum 
{
    EString name;
    EStringList typeList;
    EList<int> valueList;

    EString getPrintStr();
};

struct Class;
typedef SmartPtr(Class) ClassPtr;
struct REFLECTION_DLL Class
{
    EString name;
    EString description;
    EStringList parentNameList;

    EList<FunctionPtr> constructorList;
    EList<FunctionPtr> destructorList;

    EList<VariablePtr> variableList;
    EList<FunctionPtr> functionList;
    EList<EnumPtr> enumList;

    bool ifPureVirtual = false;
    EMap<EString, EString> userData;

    void copyFrom(ClassPtr c);
    EString getPrintStr();
};

struct CppCollection;
typedef SmartPtr(CppCollection) CppCollectionPtr;
struct REFLECTION_DLL CppCollection
{
public:
    EMap<EString, ClassPtr> mapClassPtr;
    EList<ClassPtr> listClassPtr;

    EStringList needClassNameList;
    // EString focusedClassName;
    // QList<FunctionPtr> functionList;
    EString getPrintStr();
};

struct CppFile;
typedef SmartPtr(CppFile) CppFilePtr;
struct REFLECTION_DLL CppFile
{
public:
    EString fileName;
    EStringList incFilePathList;
    EStringList classNameList;
    EString getPrintStr();
};

}

#endif // CPP_INFO_H
